/**
 * Chrowety
 * twitter.msg.js
 */

var twitter = window.twitter || {};

/**
 * twitter.msg
 * Traduz mensagens do Twitter
 *
 */
twitter.msg = function( message, placeholder )
{
    var a;
    
    if( message.match(/Rate limit exceeded\. Clients may not make more than \d+ requests per hour\./) )
    {
    	a = i18n.get('rate_limit_exceeded');
    }
    else
    {
        switch(message)
        {
            case 'Could not follow user: '+placeholder+' is already on your list.':
                a = i18n.get('you_are_already_following', '@'+placeholder);
                break;

            case "Could not follow user: You can't follow yourself!":
                a = i18n.get('you_cant_follow_yourself');
                break;

            case 'You are not friends with the specified user.':
                a = i18n.get('you_are_not_following', '@'+placeholder);
                break;     
            
            case 'error':
                a = i18n.get('error');
                break;
        }    	
    }
    
    return a;
};